package com.training.java.core.collections.car.post15;

import java.util.HashMap;
import java.util.Map;

public class CarMapDemo {

	public static void main(String[] args) {

		// Instantiating multiple objects Car1,Car2,Car3

		Car carBmw = new Car("1234", "BMW", "X5");
		Car carFord = new Car("2345", "Ford", "Focus");
		Car carHonda = new Car("3456", "Honda", "City");

		// Creating the Map Collection
		Map<String, String> carsByOwner = new HashMap<String, String>();

		// Add the Entry to Map-KEY is "Chandana", Value of key is "carBmw".

		carsByOwner.put("Chandana", "carBmw");
		carsByOwner.put("Satish", "carFord");
		carsByOwner.put("Satya", "carHonda");

		// declaring a variable chandanaCar to get the VALUE of KEY Chandana.

		// Car chandanasCar = carsByOwner.get("Chandana");

		// System.out.println("Chandana's Car is  "+ chandanasCar.getMake());

	}

}
